<?php
/**
 * Eren Framework
 * 
 * Define the Interface of DB Class
 * 
 * @category System
 * @author Manu Soros Leu
 * @copyright manusoros@gmail.com
 */

abstract class Eren_DB_Abstract
{
    
    /**
     * The instance of DB class
     * 
     * @var Eren_DB_Abstract
     */
    protected $_DB        = NULL;
    
    /**
     * The Config of DB
     * 
     * @var array
     */
    protected $_DBConfig  = array();
    
    /**
     * Change DB to operate
     * 
     * @param string $DBName
     * @throws Eren_DB_Exception
     * @return bool
     */
    abstract public function DB($DBName);
    
    /**
     * Execute SELECT SQL
     * 
     * @param string $SQL
     * @throws Eren_DB_Exception
     * @return array
     */
    abstract public function select($SQL);
    
    /**
     * Execute INSERT SQL
     * 
     * @param string $SQL
     * @throws Eren_DB_Exception
     * @return int
     */
    abstract public function insert($SQL);
    
    /**
     * Execute UPDATE SQL
     * 
     * @param string $SQL
     * @return bool
     */
    abstract public function update($SQL);
    
    /**
     * Execute DELETE SQL
     * 
     * @param string $SQL
     * @throws Eren_DB_Exception
     * @return bool
     */
    abstract public function delete($SQL);
    
    /**
     * Execute COUNT SQL
     * 
     * @param string $SQL
     * @return int
     */
    abstract public function count($SQL);
}